cmake_minimum_required (VERSION 3.20)

set(MODULE_NAME odvWrapper)

# # 业务层代码
add_subdirectory(odvAppModule)

set(SRC_LIST
    odvWrapper.cpp
    PythonModule.cpp
)

set(INCLUDE_LIST
    PythonModule.h
)

# # 导出python
pybind11_add_module(${MODULE_NAME} ${SRC_LIST} ${INCLUDE_LIST}) #默认不会链接任何库，包括上面的link_libraries
target_link_libraries(${MODULE_NAME} PUBLIC odvAppModule)
set_target_properties(${MODULE_NAME} PROPERTIES
    LIBRARY_OUTPUT_DIRECTORY "${PROJECT_ROOT_DIR}/pyCode/modules"
    RUNTIME_OUTPUT_DIRECTORY "${PROJECT_ROOT_DIR}/pyCode/modules"
)

##### 测试可执行文件
message(STATUS ${ODV_INCLUDE_DIRS})
add_executable(odvWrapperTest QtTest.cpp)
target_link_libraries(odvWrapperTest PUBLIC odvAppModule)
target_link_libraries(odvWrapperTest PUBLIC
    Qt5::Core
    Qt5::Gui
    Qt5::Widgets
)